﻿// -----------------------------------------------------------------------
// <copyright file="IPushCountRepository.cs" company="Zen Design Corp">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Zen.BlackBerry.Push.Count
{
	/// <summary>
	/// Service for tracking when push requests are complete.
	/// </summary>
	public interface IPushCountRepository
	{
		/// <summary>
		/// Adds a counter for the push request with the given push id.
		/// </summary>
		/// <param name="pushId">The push id.</param>
		void Add(string pushId);

		/// <summary>
		/// Increments the counter for the push request with the given push id by the amount indicated.
		/// </summary>
		/// <param name="pushId">The push id.</param>
		/// <param name="amount">The amount.</param>
		/// <param name="maxCount">The max count.</param>
		/// <returns></returns>
		bool Increment(string pushId, int amount, int maxCount);

		/// <summary>
		/// Removes a counter for the push request with the given push id.
		/// </summary>
		/// <param name="pushId">The push id.</param>
		void Remove(string pushId);
	}
}
